<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <div id="app">
    <name-age>
      周杰伦
    </name-age>
  </div>
  <script src="../vue.js"></script>
  <script>
    Vue.component('name-age', {
      template: `
        <div>
          <p>说了再见</p>
          <slot></slot>
        </div>
      `
    })

    var vm = new Vue({
      el: '#app',
      data: {
        name: '吾乃常山赵子龙',
        age: 28,
      },
      methods: {
        handle(val) {
          console.log(val);

        }
      }
    })
  </script>
</body>

</html>